package com.tools.service;

import com.tools.entity.NBAPlayer;

import java.io.IOException;
import java.util.List;

public interface PlayerService {

    void addPlayer(NBAPlayer nbaPlayer, String id) throws IOException;

    NBAPlayer getPlayer(Integer id) throws IOException;

    void updatePlayer(NBAPlayer nbaPlayer, String id) throws IOException;

    void deleteAll() throws IOException;

    void deleteById(String id) throws IOException;

    void importAll() throws IOException;

    /**
     * 直接查询
     * @return
     * @throws IOException
     */
    List<NBAPlayer> termQuery(String key, String query) throws IOException;

    /**
     * 查询字符串进行分词查询
     * @return
     * @throws IOException
     */
    List<NBAPlayer> matchQuery(String key, String query) throws IOException;
}
